Skip to main content

Creating a Traffic Policy

When you created a service, the default traffic policy was automatically created for you. This policy is applied for the entire world. You can edit this policy, but cannot delete it. You can add additional policies which are more geo specific. There are 3 types of policies which can be created:

  • Static Policy - You specify weights for each provider
  • Dynamic Policy - Best performing CDN is automatically selected
  • Cost Based Policy - Takes CDN cost into consideration.

Notes:

  • Some of the policies described below require defining performance and availability monitoring. For more information, see Creating a monitor.
  • In case one CDN provider is selected for a policy, it will be automatically defined as a Static Policy with 100% of the traffic going to this CDN.
  • When traffic policy change has been made, the change should become visible in a few minutes, however this time depends on the DNS propagation time.

When creating a new policy, the created policy should appear in the traffic policies table. You can either edit it or delete it.

Creating a Dynamic Policy

Dynamic policies are very useful if your service is sensitive to performance. This policy allows you to enjoy the best performing CDN at any point in time.

To create a Dynamic Policy:

  1. Navigate to your service.
  2. Choose the Traffic Policies tab.
  3. Click on Add Policy.
  4. Select the CDN providers to be used in this policy, and click Next. Note: You have to pick more than one CDN in order for the next steps to appear.
  5. Select Dynamic for the type of policy.
  6. Specify the geolocations which this policy should be applied for. You can specify multiple locations. Click Next.
  7. Specify the performance monitor to be used for this policy. This monitor will be used to determine the best performing CDN. If you haven’t defined one, you can create one by clicking on the + button. Click Next*.
  8. Select whether to enable automatic failover between the providers. If you pick Yes, you will need to specify an availability monitor. Click Next.
  9. You have completed all the steps. You can review the summary of your traffic policy, and click Apply Policy to create it.

Creating a Static Policy

Static policy provides you the ability to define a weight for each one of the providers. To create a Static Policy:

  1. Navigate to your service.
  2. Choose the Traffic Policies tab.
  3. Click on Add Policy.
  4. Select the CDN providers to be used in this policy, and click Next. Note: You have to pick more than one CDN in order for the next steps to appear.
  5. Select Static for the type of policy.
  6. Specify the geolocations which this policy should be applied for. You can specify multiple locations. Click Next.
  7. Select whether to enable automatic failover between the providers. If you pick Yes, you will need to specify an availability monitor. Click Next.
  8. Specify the weight in percentage for each of the providers. Note that the total weight must be 100%.
  9. You have completed all the steps. You can review the summary of your traffic policy, and click Apply Policy to create it.

Creating a Cost-Based Policy

Cost-Based policy knows how to take cost into consideration when routing traffic to CDNs:

  • CDN prices - you can prioritize the CDNs according to their price, i.e. cheaper CDN should have the higher priority.
  • Traffic Commitment - If you have a commitment with one of the providers, the system will make sure that you will utilize it.

To create a Cost-Based Policy:

  1. Navigate to your service.
  2. Choose the Traffic Policies tab.
  3. Click on Add Policy.
  4. Select the CDN providers to be used in this policy, and click Next. Note: You have to pick more than one CDN in order for the next steps to appear.
  5. Select Cost-Based for the type of policy.
  6. Specify the geolocations which this policy should be applied for. You can specify multiple locations. Click Next.
  7. Select whether to enable automatic failover between the providers. If you pick Yes, you will need to specify an availability monitor. Click Next.
  8. Specify whether a performance penalty should be applied. If penalty percentage is defined, traffic will be routed to a CDN with a higher priority, while its performance is not worse than the penalty. For example, assume you define 10% for the performance penalty if CDN-A has a higher priority over CDN-B, then CDN-A will be used as long as its performance isn’t worse than CDN-B by 10%. Click Next.
  9. Drag & drop the CDNs to define the priorities. The cheapest CDN should be first.
  10. You have completed all the steps. You can review the summary of your traffic policy, and click Apply Policy to create it.